import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('PropupBase')
export class PropupBase extends Component {
    @property(Node)
    closeBtn: Node = null

    protected onLoad(): void {
        if(this.closeBtn){
            this.closeBtn.on(Node.EventType.TOUCH_END,this.onCloseBtnClick,this);
        }
    }

    protected onDestroy(): void {
        if(this.closeBtn){
            this.closeBtn.off(Node.EventType.TOUCH_END,this.onCloseBtnClick,this);
        }
    }

    onCloseBtnClick(){

        this.node.active = false;
    }
    start() {

    }

    update(deltaTime: number) {
        
    }
}


